Earlier versions of XHTML combine elements of style within the page itself
o CSS allowed content and style to be separated
W3C created CSS to replace HTML tables, font tags, frames and other presentational tags of HTML elements
By keeping the design in separate files that were linked to the HTML files you reduce the likelihood of your page designs falling apart over time as different contributors add to the webpage.
One CSS file can be used to set the style and format for numerous different webpages.
CSS code consists of a selector and a declaration:
o Selector- HTML tag to style sheet will change
o Declaration- What the style actually is and what to do with it.
RULES
Internal/embedded
o Style characteristics are embedded in the HEAD section; used when a single page requires a unique style sheet.
External/linked
o Connection made via the link tag; uses optional TYPE attribute to specify the media type
Imported
o Allows for using style sheets for other sources
Incline
o Least flexible; each element must be tagged
DAY 2
In CSS file (paragraph)
o P. rightà p{text-align: right;}
ID selector is for if you want your style to be used in a specific section of the body.
<DIV> selector is used to group sections together.
DAY 1
RULES
DAY 2
WHAT YOU CAN CHANGE
CASCADING- Specificity, order and hierarchy